/**
 * Created by Amaris on 2016/12/6.
 */

var express = require('express');
var router = express.Router();
var userjoinCtrl = require('../../controller/controller.userjoin.js');



router.post('/createUserJoin', function (req, res, next) {
    userjoinCtrl.create(req.body, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});
router.get('/getUserJoinInfo', function (req, res, next) {
    userjoinCtrl.getInfo(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.get('/getUserJoinInfoByUserIdActionId', function (req, res, next) {
    userjoinCtrl.getUserJoinInfoByUserIdActionId(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.get('/getUserJoinListByUserId', function (req, res, next) {
    userjoinCtrl.getUserJoinListByUserId(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});


router.get('/getUserJoinListByTeamId', function (req, res, next) {
    userjoinCtrl.getUserJoinListByTeamId(req.query, function (err, result) {
        if (err) throw err;
        res.send(result);
    });
});

router.get('/deleUserJoin',function(req,res,next){
    userjoinCtrl.deleUserJoin(req.query,function(err,result){
        if (err) throw err;
        res.send(result);
    });
});

module.exports = router;